﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using System.ComponentModel;
using System.Text;
using System.Collections.Generic;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Workflows.Services;

namespace Coevery.Tasacion.Handlers
{
    public class WorkflowContentHandler : ContentHandler
    {
        // Parece que este handler ya está creado en core y no haría falta. Quizás aquí podría poner los míos

        public WorkflowContentHandler(IWorkflowManager workflowManager)
        {
            OnUnpublished<ContentPart>(
                (context, part) =>
                    workflowManager.TriggerEvent("ContentUnpublished",
                    context.ContentItem,
                    () => new Dictionary<string, object> { { 
                              "Content", context.ContentItem } }));
        }
    }
}